<!DOCTYPE html>
<html lang="en">
<head>
    <title>司法局（区县司法局/市司法局/省司法厅/监狱局）首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="/static/css/main-page/g-reset.css" />
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/main-page/home-public.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/main-page/home1.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/main-page/home3.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/main-page/messageDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/static/js/main-page/echarts.min.js"></script>
    <script type="text/javascript" src="/static/js/main-page/china-main-city-map.js"></script>
    <style>
        body {
            height:100%;
            background:transparent;
        }
        #area-map textarea {
            display:block;
        }
        table {
            border-collapse: collapse;
            border-spacing: 0;
            border: 1px solid #fffdfd;
            background-color:white;
        }

        th,td {
            border: 0px;
            color: #404060;
            padding: 9.5px;
        }

        th {
            background-color: #2cbbea;
            /*font: bold 8px "微软雅黑";*/
            color: #fff;
        }

        td {
            /*font: 14px "微软雅黑";*/
        }

        tbody tr {
            background-color: #FFFFFF;
        }

        tbody tr:hover {
            cursor: pointer;
            background-color: #fafafa;
        }
        ::-webkit-scrollbar{
            display: none;
        }
        .org-statistics>ul>li {
            width:200px;
        }
    </style>
</head>
<body>
<div class="home-page">
    <input id="area_code" type="text" style="display: none" value="${jgCodeMap.code!0}">
    <input id="area_name" type="text" style="display: none" value="${jgCodeMap.name!0}">
    <input id="parent_code" type="text" style="display: none" value="${jgCodeMap.parentCode!0}">
    <input id="parent_name" type="text" style="display: none" value="${jgCodeMap.parentName!0}">
    <input id="departId" name="departId" class="mini-hidden"  style="width: 100%;" value="${departId!''}"/>
    <input id="level" name="level" class="mini-hidden"  style="width: 100%;" value="${level!''}"/>

    <div class="home-top clearfix">
        <div class="home-top-left" style="position: relative; width: 28%">
            <ul class="region-title clearfix">
                <li class="tab-item tab-active" style="cursor:default;"><i class="iconfont icon-jigouxinxi"></i> 数据指标统计</li>
                <li class="tab-item tab-active" style="cursor:pointer;float:right;margin-right:20px;font-size:12px" onclick="findAll()">查看全部</li>
            </ul>
            <table style="width:-webkit-fill-available;">
                <thead>
                <tr align="center">
                    <#if level == '06'>
                        <th >各地市</th>
                    <#elseif level =='07'>
                        <th >各区县</th>
                    <#elseif level =='08'>
                        <th >各乡镇街道</th>
                    <#elseif level == '09'>
                        <th >各监狱</th>
                    <#elseif level == '15'>
                        <th >各社矫中心</th>
                    <#elseif level == '4'>
                        <th >各看守所</th>
                    <#else >
                    </#if>

                    <th>录入<br>总人数</th>
                    <th>发起核查<br>总人数</th>
                    <th>完成核查<br>总人数</th>
                    <th>发起衔接<br>总人数</th>
                    <th>完成衔接<br>总人数</th>
                </tr>
                </thead>
                <tbody id="j_tbData">
                    <#assign x = 0/>
                    <#assign y = size?number>
                    <#list census as map>
                        <#if (x<5)>
                            <tr align="center">
                                <td>
                                    ${map["jg"]}
                                </td>
                                <td>
                                    ${map["lrrs"]}
                                </td>
                                <td>
                                    ${map["hczrs"]}
                                </td>
                                <td>
                                    ${map["wchczrs"]}
                                </td>
                                <td>
                                    ${map["xjzs"]}
                                </td>
                                <td>
                                    ${map["xjcgs"]}
                                </td>
                            </tr>
                        <#elseif x==5>
                            <tr align="center">
                                <td>...</td>
                                <td>...</td>
                                <td>...</td>
                                <td>...</td>
                                <td>...</td>
                                <td>...</td>
                            </tr>
                         <#elseif x gte y>
                            <tr align="center">
                                <td>
                                    ${map["jg"]}
                                </td>
                                <td>
                                    ${map["lrrs"]}
                                </td>
                                <td>
                                    ${map["hczrs"]}
                                </td>
                                <td>
                                    ${map["wchczrs"]}
                                </td>
                                <td>
                                    ${map["xjzs"]}
                                </td>
                                <td>
                                    ${map["xjcgs"]}
                                </td>
                            </tr>
                        <#else>
                        </#if>
                        <#assign x=x+1 />
                    </#list>

                </tbody>
            </table>
        </div>
        <div class="home-top-center" style="position: relative;width:40.5%">
            <#if "${userLevel !''}"=='09'>
                <ul class="region-title clearfix">
                    <li class="tab-item tab-active" style="cursor:default;"><i class="iconfont icon-anbangxinxitongji" aria-hidden="true"></i>&nbsp;安帮信息统计
                    </li>
                </ul>
                <div class="org-statistics">
                    <div class="org-statistics-title">
                        <i class="iconfont icon-fuxingrenyuan"></i> 预安置人员
                    </div>
                    <ul class="azbjdx-box clearfix">
                        <li style="cursor:pointer;" onclick="toPage(1)">
                            <span>${sfsjMap.hcchCount!0}</span>
                            <div>核查成功人数</div>
                        </li>
                        <li style="cursor:pointer;" onclick="toPage(2)">
                            <span>${sfsjMap.hcsbCount!0}</span>
                            <div>核查失败人数</div>
                        </li>
                        <li style="cursor:pointer;" onclick="toPage(3)">
                            <span>${sfsjMap.fqqiCount!0}</span>
                            <div>发起迁移人数</div>
                        </li>
                        <li style="cursor:pointer;" onclick="toPage(4)">
                            <span>${sfsjMap.yxjCount!0}</span>
                            <div>已衔接人数</div>
                        </li>
                        <li style="cursor:pointer;" onclick="toPage(5)">
                            <span>${sfsjMap.xjsbCount!0}</span>
                            <div>衔接失败人数</div>
                        </li>
                        <li style="cursor:pointer;" onclick="toPage(6)">
                            <span>${sfsjMap.jsqiCount!0}</span>
                            <div>接收迁移人数</div>
                        </li>
                    </ul>
                </div>
            </#if>
            <#if "${userLevel !''}"!='09'>
                <#if "${userLevel !''}"!='08'>
                    <button  id="showButton" style="position: absolute;left: 10px;top: 10px" onClick="wzsXinQv()">点击查看地图未显示地区统计项</button>
                </#if>
                <div style="padding: 0 10px 10px;margin-top:50px">
                    <div id="area-map" style="width: 100%;height: 100%;padding-top: 10px"></div>
                </div>
            </#if>
        </div>
        <div class="home-top-right" style="position: relative">
            <ul class="tab-item-box region-title clearfix" id="aaaa">
                <li data-arg="getSyTzggList" class="tab-item tab-active" id="b1"><span style="font-size: 15px">通知公告</span></li>
                <li data-arg="getSySbxtList" class="tab-item" id="b2"><span style="font-size: 15px">上报协调</span></li>
                <li data-arg="getSyZcwjList" class="tab-item" id="b3"><span style="font-size: 15px">政策文件</span></li>
                <li data-arg="getSyJytjList" class="tab-item" id="b4"><span style="font-size: 15px">经验推介</span></li>
                <li data-arg="getXttzList" class="tab-item" id="b5"><span style="font-size: 15px">系统通知</span></li>
            </ul>

                <div class="data-loading">
                    <i class="fa fa-spinner fa-pulse fa-3x "></i>
                </div>
                <ul class="message-content" id="content">
                </ul>


        </div>
    </div>

    <#-- 统计图部分 -->
    <div class="home-bottom" >
        <div class="region-title clearfix" style="position: relative">
            <iframe src="/azbj/yazgl/JobRanking?id=247518241980416"
                    id="frameDetail" name="frameDetail"
                    onload="setIframe()" height="700px"
                    width="105%" frameborder="0" scrolling="no">
            </iframe>
        </div>
    </div>

    <#-- 弹出框 -->
    <div class="tankuang">
        <div class="tankuang-content">
            <div class="tkTitle">详情</div>
            <div class="content">
                <!--案例内文开始-->
                <div class="wzinfo">
                    <h3 class="title"></h3>
                    <h5>详细内容 <span>发布时间:<i class="adddate"></i></span> <span>发布单位:<i class="fbdw"></i></span></h5>
                    <div id="content123"></div>
                </div>
                <!--案例内文结束-->
            </div>
            <input name="id" id="id" hidden readonly />
            <!-- 通知类型 -->
            <input name="type" id="type" hidden readonly />
            <div class="closeTK1" id="fujian" onclick="downloadFile()">下载附件</div>
            <div class="closeTK">关闭</div>
        </div>
    </div>
    <input type="hidden" value="${userLevel!''}" id="aaa"/>
</div>
<script src="/static/js/common/common.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/main-page/main-area-map.js"></script>
<script type="text/javascript" src="/static/js/main-page/messageNotification.js"></script>
<script type="text/javascript" src="/static/js/main-page/main.js"></script>
<script type="text/javascript" src="/static/js/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
    $(function () {
        mini.parse();
        if(!window.localStorage.getItem('storge')){
            mini.alert('缓存数据过多会造成系统异常，建议您及时清理浏览器缓存！');
            window.localStorage.setItem('storge','true')
        }
    })
    function downloadFile() {
        var id = $("#id").val();
        var type = $("#type").val();
        if (1 == type) {
            //下载通知公告
            $.ajax({
                url: encodeURI("/azbj/tzgggl/noticeInfoManage/ifFileExist?id=" + id),
                cache: false,
                success: function (result) {
                    if (result.code == 1) {
                        top.location.href = encodeURI("/azbj/tzgggl/noticeInfoManage/downloadFilesZip/" + id);
                    } else {
                        mini.alert("没有可下载的文件");
                    }
                }
            });
        } else if (2 == type) {
            //下载政策文件
            $.ajax({
                url: encodeURI("/azbj/abzlxxgl/zcwjInfoManage/ifFileExist?id=" + id + "&taskId=" + 20),
                cache: false,
                success: function (result) {
                    if (result.code == 1) {
                        top.location.href = encodeURI("/azbj/abzlxxgl/zcwjInfoManage/downloadFilesZip?id=" + id + "&taskId=" + 20);
                    } else {
                        mini.alert("没有可下载的文件");
                    }
                }
            });
        } else if (3 == type) {
            //下载经验推介
            $.ajax({
                url: encodeURI("/azbj/abzlxxgl/zcwjInfoManage/ifFileExist?id=" + id + "&taskId=" + 22),
                cache: false,
                success: function (result) {
                    if (result.code == 1) {
                        top.location.href = encodeURI("/azbj/abzlxxgl/zcwjInfoManage/downloadFilesZip?id=" + id + "&taskId=" + 22);
                    } else {
                        mini.alert("没有可下载的文件");
                    }
                }
            });
        }
    }
    function setIframe() {
        var iframe = document.getElementById("frameDetail");
        var bHeight = iframe.contentWindow.document.body.scrollHeight;
        var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
        var height = bHeight > dHeight ? bHeight : dHeight;
        iframe.height = height;
    }

    function findAll() {
        var level = mini.get("level");
        if (level.getValue() == '06') {
            $('.nav-parent-wrap li', window.parent.document).eq(1).trigger('click');
            $('.nav-child-wrap div ul li', window.parent.document).eq(6).trigger('click')
        }else if (level.getValue() == '09') {
            $('.nav-parent-wrap li', window.parent.document).eq(1).trigger('click');
            $('.nav-child-wrap div ul li', window.parent.document).eq(4).trigger('click')
        }else {
            $('.nav-parent-wrap li', window.parent.document).eq(1).trigger('click');
            $('.nav-child-wrap div ul li', window.parent.document).eq(5).trigger('click')
        }
    }
    /**
     * 跳转对应页面
     * @param e e
     */
    function toPage(e) {
        if (e == '1') {
            childTheParent("iconfont icon-yuanzhihecharenyuan","246736963534848","预安置人员核查","/basic/public-tab/view","40000","jyj_hccg");
        }else if (e == '2') {
            childTheParent("iconfont icon-yuanzhihecharenyuan","246736963534848","预安置人员核查","/basic/public-tab/view","40000","jyj_hcsb");
        }else if (e == '3') {
            childTheParent("iconfont icon-yuanzhirenyuanxinxiluru","258228281589760","预安置人员迁移","/basic/public-tab/view","40000");
        }else if (e == '4') {
            childTheParent("iconfont icon-huise","246736969695232","预释放人员衔接","/basic/public-tab/view","40000","jyj_yxj");
        }else if (e == '5') {
            childTheParent("iconfont icon-huise","246736969695232","预释放人员衔接","/basic/public-tab/view","40000","jyj_xjsb");
        }else if (e == '6') {
            childTheParent("iconfont icon-yuanzhirenyuanxinxiluru","258228281589760","预安置人员迁移","/basic/public-tab/view","40000","jyj_jsqy");
        }
    }

    /**
     * 执行父页面方法
     * @param childICO 要跳转到的子图标
     * @param childId 要跳转到的子id，蓝色的table的id
     * @param childName 要跳转到的子名称
     * @param childUrl 要跳转到的子模板链接
     * @param topNav 上面的导航栏按钮id，一级菜单ID
     * @param different 返回不同，方便区分跳转页面
     */
    function childTheParent(childICO,childId,childName,childUrl,topNavId,different){
        parent.skipPublic(childICO,childId,childName,childUrl,topNavId,different);
    }
</script>
</body>
</html>